function [trafficBuffer] = creatTraffic (noOFpakets, trafficBuffer, primaryPathTable)
    primaryNodes = length(primaryPathTable);
    trafficNodes = length(trafficBuffer);
    tempTraffic = zeros(1,2);
    
    if primaryNodes ~= trafficNodes
        for i = 1:primaryNodes
            tempTraffic(i, 1) = primaryPathTable(i);
            tempTraffic(i, 2) = 0;
        end
        for i = 1:primaryNodes  
            nodeP = primaryPathTable(i);
            for j = 1:trafficNodes
                nodeT = trafficBuffer(j);
                    if nodeT == nodeP
                        tempTraffic(i,2) = trafficBuffer(j, 2); 
                    end
                       
            end
        end 
        trafficBuffer = tempTraffic;
    end
        trafficBuffer(1,2)= trafficBuffer(1,2) + noOFpakets;    
        disp('The buffer before the movements:');
        disp(trafficBuffer);    
end